package com.itheima.admin.controller;

import com.itheima.admin.Service.AdUserService;
import com.itheima.apis.admin.LoginControllerApi;
import com.itheima.model.common.admin.dtos.UserDto;
import com.itheima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/login")
public class LoginController implements LoginControllerApi {
    @Autowired
    private AdUserService adUserService;
    @PostMapping("/in")
    @Override
    public ResponseResult login(@RequestBody UserDto userDto) {


        return adUserService.login(userDto);
    }
}
